TimeSent Property (Message Object) 

The TimeSent property sets or returns the date and time the message was sent as a vbDate variant data type. Read/write.

Syntax

objMessage.TimeSent

Data Type

Variant (vbDate format)

Remarks

The TimeReceived and TimeSent properties return dates and times as the local time for the user s system.

When you send messages using the Message object s Send method, the MAPI system sets the TimeReceived and TimeSent properties for you. However, when you post messages in a public folder, you must first explicitly set these properties. For a message posted to a public folder, set both properties to the same time value.

Note that the TimeReceived and TimeSent properties represent local time. However, when you access MAPI time properties through the Fields collection Item property, the time values represent Greenwich Mean Time.

The TimeSent property corresponds to the MAPI Property PR_CLIENT_SUBMIT_TIME.

Example

This example displays the date a message was sent and received:

' from the sample function Message_TimeSentAndReceived

   ' verify that objOneMsg is valid, then...

    With objOneMsg

        strMsg = "Message sent " & Format(.TimeSent, "Short Date")

        strMsg = strMsg & ", " & Format(.TimeSent, "Long Time")

        strMsg = strMsg & "; received "

        strMsg = strMsg & Format(.TimeReceived, "Short Date") & ", "

        strMsg = strMsg & Format(.TimeReceived, "Long Time")

        MsgBox strMsg

    End With

 

See Also

Item, Property (Fields Collection)

TimeReceived Property (Message Object)138S6WY